﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 简单工厂.War3.Service;

namespace 简单工厂
{
    /// <summary>
    /// 1 简单工厂模式SimpleFactory
    /// 2 简单工厂+ 配置文件=可配置
    /// 3 简单工厂+ 配置文件+反射=可配置可扩展
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Player player = new Player() { Id = 8888, Name = "大黄瓜" };

                //Human human = new Human();
                //player.PlayWar3(human);

                var factory = ObjectFactory.CreateInstanceConfigReflection();
                player.PlayWar3(factory);
            }
            catch (Exception ex)
            {

                throw ex;
            }
            Console.Read();
        }
    }
}
